<style lang="less">
.top_container{
  padding-top:14vw;
  width: 100vw;
  height:180px;
  text-align: center;
  background: url(../assets/@2x.png) no-repeat 0 0;
}
.profile{
  width:33vw;
  margin: 0 auto;
  border-radius:50vw;
}
.name_profile{
  color: white;
}
.weui-form-preview__ft p {
  text-align: center;
}
 .vux-label {
 padding-left:10px !important;
 color:#999 !important
}
 .weui-cell__hd img { width:15px}
</style>
<template>
  <div class="setting">
  <!-- template>.setting>(.top_container>(img.profile+h4.name_profile)+.formpreview) -->
    <div class="top_container">
      <img class="profile" src="../assets/header_profile.png" alt="">
      <h4 class="name_profile" v-if="dataUserInfo">

        {{ dataUserInfo.body.accountName }}

      </h4>
      <span class="formpreview"></span>
    </div>

    <div class="card_detial">
      <div class="weui-form-preview__ft"><a href="javascript:" class="weui-form-preview__btn weui-form-preview__btn_default">
          <p v-if="dataUserInfo">{{dataUserInfo.body.totalJfAmount}}</p>
          <p>总积分</p></a><a href="javascript:" class="weui-form-preview__btn weui-form-preview__btn_primary">
          <p v-if="dataUserInfo">{{dataUserInfo.body.jfAmount}}</p>
          <p>可用积分</p>
        </a>
      </div>
    </div>
      <div class="list-item">
        <cell :link="{path:'/award'}" title="奖品管理">
        <img src="../assets/icon_lucky-draw@2x.png" slot="icon"  alt=""/>
        </cell>
        <cell :link="{path:'/setting'}"  title="设置">
        <!-- :link="{path:'/setting'}" -->
        <img src="../assets/icon_set-up@2x.png" slot="icon" alt=""/>
        </cell>

        <!-- <cell  title="logout"> -->
        <!-- <img src="../assets/icon_set&#45;up@2x.png" slot="icon" alt=""/> -->
        <!-- </cell> -->
      </div>
  </div>
</template>
  <script>
// import { FormPreview } from "vux"

import { FormPreview,Cell } from 'vux'
export default {
  created(){
    console.info('created');
    this.goPoint()
  },
  computed:{

    Login(){
      return this.$store.getters.all_restful
    }
    ,
    dataUserInfo(){
      return this.$store.getters.all_queryuserinfo
    }
  },
  methods:{
    loginout() {
      this.$store.commit('all_restful',{
        actionName:'Logout',
          url:'baseurl',
          postData:{}
      })
  },
      goPoint(){
        this.$store.commit("restful_api",this.fetchPoint)
      }
  },
  data () {
    return {
      fetchPoint:{
        actionName:'QueryUserInfo',
        url:'baseapi',
        postData:{

        }
      }
    }
  },
  components:{
    FormPreview,
    Cell
  }
}
  </script>






